package com.takanafu.haru.code{
	import com.takanafu.haru.code.CodeBase;
	
	public class CodeNot extends CodeBase{
		private var code:CodeBase;
		
		public function CodeNot(c:CodeBase){
			this.code = c;
		}
		override public function run():CodeBase{
			var c:CodeBase = this.code.run();
			var p:CodeBoolean = c as CodeBoolean;
			
			if(p.isTrue() == true){
				return CodeBoolean.False;
			}
			return CodeBoolean.True;
		}
	}
}